Filtering strength determination method, moving picture coding method and moving picture decoding method

ABSTRACT

A moving picture coding apparatus including an inter-pixel filter having the filters for filtering decoded image data so as to remove block distortion which is high frequency noise around block boundaries. The filters include a filter A 114   a , a filter B 114   b , a filter C 114   c , and a filter D 114   d ; each having a different filtering strength. The coding apparatus also includes a filter processing control unit for determining a filtering strength of the inter-pixel filter.

This application is a continuation application of application Ser. No.12/003,484, filed Dec. 26, 2007 which is a continuation application ofapplication Ser. No. 10/479,958, which is a National Stage Applicationof International Application No. PCT/JP03/08070 filed Jun. 26, 2003.

TECHNICAL FIELD

The present invention relates to a filtering strength determinationmethod for determining a strength of filtering to remove inter-blockcoding distortion, as well as to a moving picture coding method and amoving picture decoding method for applying filtering with a determinedstrength so as to code/decode a moving picture.

BACKGROUND ART

A filter is used in video compression technique usually to improvepicture quality as well as compression ratio. Blocky artifacts usuallyoccur at decoded pictures of a low bit rate video compression due toquantization noise as well as motion compensation. One of the tasks of afilter is to smoothen the boundaries of blocks in the decoded picturesso that these blocky artifacts are reduced or removed.

Some video compression techniques, for example like the committee draftof ISO/IEC 14496-2 Part 10 which is under development, use loop filterto improve the compression of moving pictures (See Joint Video Team(JVT) of ISO/IEC MPEG and ITU-T VCEG Joint Committee Draft 2002 May 10,JVT-C167 9.5 Deblocking Filter, as an example). Loop filter is appliedto both reference and non-reference pictures to improve the picturequality of the decoded pictures.

FIG. 1 shows the decision algorithm used in the committee draft ofISO/IEC 14496-2 Part 10 to select the strength of the filter to be used.

The decision is performed at the block boundary of two neighboringblocks p and q. First, a determination is performed on the blocks p andq to determine one of them is intra-coded or not (Step S102). If one ofthe blocks p and q is intra-coded (Yes in Step S102), a check isperformed to see if the block boundary falls on a macroblock boundary(Step S103). If the result of the check shows that the block boundaryfalls on the macroblock boundary, that is, if the two blocks are notfrom the same macroblock, the strongest strength (Bs=4) will be selected(Yes in Step S103). If the result of the check shows that the blockboundary does not fall on the macroblock boundary, that is, if these twoblocks are from the same macroblock, the second strongest strength(Bs=3) will be selected (No in Step S103).

If the result of the check (Step S102) shows that both the blocks p andq are not intra-coded (No in Step S102), a check is then performed tosee if any of the two blocks contain coefficients indicating spatialfrequency components resulted from orthogonal transform (Step S104). Ifone of these two blocks contains coefficients (Yes in Step S104), thethird strongest strength (Bs=2) will be selected. If neither of the twoblocks contains coefficients, that is, if coefficients are not coded inboth blocks p and q (No in Step S104), a decision will be made asfollows to see if filtering is to be skipped or not (Step S105).

The reference picture index numbers for both blocks p and q, Ref(p) andRef(q), will be checked to see if they are the same. Furthermore,vertical components (V(p,y) and (V(q,y)) and horizontal components(V(p,x) and (V(q,x)) of the motion vectors of the two blocks will alsobe compared with one another to see if there is a difference of lessthan one pixel. Only when the results of the above two checks show thatthe two blocks' reference picture index numbers are the same and theirvertical and horizontal motion vectors are less than one pixel apart (Noin Step S105), filtering of the boundary between these two blocks shallbe skipped. In all other cases (Yes in Step S105), a weak filtering(Bs=1) shall be performed on the block boundary.

However, the decision algorithm in the prior art does not sufficientlycover all possible cases for blocks in a predictive-coded picturereferring to two pictures. The reason is because macroblocks in apredictive-coded picture referring to two pictures can be predictedusing direct, forward, backward modes, and a mode in which two picturesare referred to. These prediction modes have not been considered in thedecision algorithm of the prior art. Similarly, in the case where oneblock uses direct mode and the other block uses a mode in which twopictures are referred to, motion vectors to be used for comparison havenot been sufficiently described in the prior art.

SUMMARY OF THE INVENTION

The present invention has been conceived in view of the above problem,and it is an object of the present invention to provide a filteringstrength determination method, as well as a moving picture coding methodand a moving picture decoding method for determining an optimumfiltering strength even when prediction coding employing two referencepictures is employed.

In order to achieve the above object, the filtering strengthdetermination method according to the present invention is a filteringstrength determination method for determining a strength of filtering toremove coding distortion between blocks that constitute a picture,comprising: a parameter obtainment step of obtaining parameters that arecoding information regarding a coded current block and a codedneighboring block adjacent to said current block; a comparison step ofmaking a comparison between the parameters of the current block and theneighboring block, when a picture including said current block and saidneighboring block is a picture employing inter picture prediction codingusing two reference pictures; and a determination step of determining afiltering strength, based on a comparison result obtained in thecomparison step.

Here, the parameters may include coding mode information of the currentblock and the neighboring block, the comparison step may include apicture number judgment step of judging whether the number of referencepictures referred to by the current block and the number of referencepictures referred to by the neighboring block are the same or not, basedon the respective coding mode information of the current block and theneighboring block, and the filtering strength which differs depending ona judgment result obtained in the picture number judgment step may bedetermined in the determination step.

Furthermore, the parameters may further include reference indices foruniquely identifying reference pictures, the comparison step may furtherinclude a reference picture judgment step of judging whether or not thecurrent block and the neighboring block refer to a same referencepicture, based on the respective reference indices of the current blockand the neighboring block, and the filtering strength which differsdepending on a judgment result obtained in the reference picturejudgment step may be determined in the determination step.

Moreover, the parameters may include motion vectors with respect to areference picture, the comparison step may further include a motionvector judgment step of judging whether or not at least one of thefollowing differences is a predetermined value or larger, based on themotion vectors included in the current block and the neighboring block:a difference between a horizontal component of an arbitrary one of themotion vectors of the current block and a horizontal component of anarbitrary one of the motion vectors of the neighboring block; and adifference between a vertical component of an arbitrary one of themotion vectors of the current block and a vertical component of anarbitrary one of the motion vectors of the neighboring block, and thefiltering strength which differs depending on a judgment result obtainedin the motion vector judgment step may be determined in thedetermination step.

Accordingly, it becomes possible to sufficiently cover all possiblecases for blocks in a predictive-coded picture referring to two picturesand to determine, in an optimum manner, a strength of a filter forremoving block distortion (coding distortion between blocks) byfiltering decoded image data so as to remove high frequency noise aroundblock boundaries, even when prediction coding in which two pictures arereferred to is employed. Moreover, this filtering strength determinationmethod is applicable to both a moving picture coding apparatus and amoving picture decoding apparatus.

Also, the filtering strength determination method according to thepresent invention is a filtering strength determination method fordetermining a strength of filtering to remove coding distortion betweenblocks that constitute a picture, comprising: a parameter obtainmentstep of obtaining a picture type of a picture that includes a codedcurrent block and a coded neighboring block adjacent to said currentblock; and a determination step of determining a stronger filteringstrength than in a case where the picture type obtained in the parameterobtainment step indicates inter picture prediction coding using onereference picture, when said picture type indicates inter pictureprediction coding using two reference pictures.

Accordingly, it becomes possible to determine, in an optimum manner, astrength of a filter for removing block distortion (coding distortionbetween blocks) by filtering decoded image data so as to remove highfrequency noise around block boundaries, even when prediction coding inwhich two pictures are referred to is employed as in the above case.Moreover, this filtering strength determination method is applicable toboth a moving picture coding apparatus and a moving picture decodingapparatus.

Furthermore, a moving picture coding method according to the presentinvention is a moving picture coding method for coding pictures makingup a moving picture on a block-by-block basis, comprising: a filteringstep of applying filtering on a boundary between the current block andthe neighboring block by the use of a filtering strength determinedusing the filtering strength determination method according to thepresent invention.

Furthermore, a moving picture decoding method according to the presentinvention is a moving picture decoding method for decoding a codedmoving picture in which pictures making up the moving picture have beencoded on a block-by-block basis, comprising: a filtering step ofapplying filtering on a boundary between the current block and theneighboring block by the use of a filtering strength determined usingthe filtering strength determination method according to the presentinvention.

Note that the present invention can be realized not only as a filteringstrength determination method, a moving picture coding method and amoving picture decoding method as described above, but also as afiltering strength determination apparatus. Additionally, the presentinvention can be realized by a moving picture coding apparatus and amoving picture decoding apparatus that have, as their steps, thecharacteristic steps included in the above filtering strengthdetermination method, moving picture coding method and moving picturedecoding method. The present invention can also be realized as a programthat causes a computer to execute such steps. And it should be notedthat such program can be distributed via recording media includingCD-ROM and the like, and transmission media including the Internet andthe like.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a flowchart showing an existing filtering strengthdetermination method.

FIG. 2 is a block diagram showing a configuration of a moving picturecoding apparatus according to the present invention.

FIG. 3 is a diagram explaining a picture order in a picture memory,wherein FIG. 3A shows an order in which pictures are inputted and FIG.3B shows an order after the pictures are reordered.

FIG. 4 is a diagram explaining pictures and reference indices.

FIG. 5 is a diagram explaining motion vectors in direct mode.

FIG. 6 is a flowchart showing a filtering strength determination methodin a filter processing control unit according to the first embodiment.

FIG. 7 is a block diagram showing a configuration of a moving picturedecoding apparatus according to the present invention.

FIG. 8 is a flowchart showing a filtering strength determination methodin a filter processing control unit according to the second embodiment.

FIG. 9 is a diagram explaining a flexible disk which stores a movingpicture coding method or a moving picture decoding method of the firstand the second embodiments. FIG. 9A illustrates an example physicalformat of the flexible disk as a recording medium itself. FIG. 9B showsan external view of the flexible disk viewed from the front, a schematiccross-sectional view and the flexible disk, while FIG. 9C shows astructure for recording and reading out the program on and from theflexible disk FD.

FIG. 10 is a block diagram showing an overall configuration of a contentsupply system for realizing a content distribution service.

FIG. 11 is a diagram showing an example of a cell phone.

FIG. 12 is a block diagram showing a configuration of the cell phone.

FIG. 13 is a diagram showing an example digital broadcasting system.

DETAILED DESCRIPTION OF THE INVENTION

The following explains embodiments of the present invention withreference to the figures.

FIG. 2 is a block diagram showing the configuration of a moving picturecoding apparatus that employs a filtering strength determination methodaccording to the present invention.

As shown in FIG. 2, this moving picture coding apparatus, which performscompression coding on an input moving picture and outputs it as a bitstream, is comprised of a picture memory 101, a difference calculationunit 102, a prediction residual coding unit 103, a bit stream generationunit 104, a prediction residual decoding unit 105, an adder 106, amotion vector estimation unit 107, a motion vector storage unit 108, amotion compensation coding unit 109, a filter processing control unit110, a picture memory 111, switches 112 and 113, and an inter-pixelfilter 114.

The picture memory 101 stores a moving picture which has been inputtedin display order on a picture-by-picture basis. “Picture” here means aunit of coding so-called screen which includes a frame and fields. Themotion vector estimation unit 107, using as a reference picture apicture which has been coded and decoded, estimates a motion vectorindicating a position deemed most appropriate in a search area withinthe picture on a block-by-block basis. Furthermore, the motion vectorestimation unit 107 notifies the estimated motion vector to the motioncompensation coding unit 109 and the motion vector storage unit 108.

The motion compensation coding unit 109 determines, using the motionvector estimated by the motion vector estimation unit 107, a coding modeused for coding a block, and generates predictive image data on thebasis of such coding mode. A coding mode, which is indicative of amethod to be used for coding a macroblock, indicates which one ofnon-intra picture coding (motion compensated coding) and intra picturecoding and the like should be performed on a macroblock. For example,when there is a weak correlation between pictures and therefore intrapicture coding is more suitable than motion prediction, intra picturecoding shall be selected. Such selected coding mode is notified to thefilter control unit 110. The motion vector and the coding mode arenotified from the motion compensation coding unit 109 to the bit streamgeneration unit 104. The motion vector storage unit 108 stores themotion vector estimated by the motion vector estimation unit 107.

The difference calculation unit 102 calculates the difference between apicture read out from the picture memory 101 and the predictive imagedata inputted by the motion compensation coding unit 109 so as togenerate prediction residual image data. The prediction residual codingunit 103 performs coding processing such as orthogonal transform andquantization on the input prediction residual image data, and generatescoded data. The bit stream generation unit 104 performs variable lengthcoding and other processing on the coded data generated by theprediction residual coding unit 103, and generates a bit stream afteradding, to such coded data, motion vector information and coding modeinformation and the like inputted by the motion compensation coding unit109.

The prediction residual decoding unit 105 performs decoding processingsuch as inverse quantization and inverse orthogonal transform on thecoded data so as to generate decoded differential image data. The adder106 adds the decoded differential image data inputted by the predictionresidual decoding unit 105 to the predictive image data inputted by themotion compensation coding unit 109 so as to generate decoded imagedata. The picture memory 111 stores the decoded image data to whichfiltering has been applied.

The filter processing control unit 110 selects a filtering strength ofthe inter-pixel filter 114 according to the input motion vectorinformation and the coding mode information, i.e. selects which one ofthe following should be used: a filter A114 a; a filter B114 b; a filterC114 c; a filter D114 d; and no-filtering (skip), and controls theswitch 112 and the switch 113. The switch 112 and the switch 113 areswitches which selectively connect to one of their respective terminals“1”˜“5” under the control of the filter processing control unit 110. Theswitch 113 is placed between the output terminal of the adder 106 andthe input terminal of the inter-pixel filter 114. Meanwhile, the switch112 is placed between the input terminal of the picture memory 111 andthe output terminal of the inter-pixel filter 114.

The inter-pixel filter 114, which is a deblocking filter that filtersdecoded image data so as to remove block distortion which is highfrequency noise around block boundaries, has the filter A114 a, thefilter B114 b, the filter C114 c, the filter D114 d, each having adifferent filtering strength. Of these filters, the filter A114 a isintended for the strongest filtering, the filter B114 b for the secondstrongest, the filter C114 c for the third strongest, and the filterD114 d for the weakest filtering. Meanwhile, the amount of operationprocessing required for filtering depends on a filtering strength. Notethat the switch 112, the switch 113 and other components illustrated inthe diagram may be implemented either as hardware or software.

FIG. 3 is a diagram explaining a picture order in the picture memory101, wherein FIG. 3A shows the order in which pictures are inputted andFIG. 3B shows the order after the pictures are reordered. In FIG. 3,vertical lines denote pictures, alphabets described in the lower rightof the respective pictures denote picture types (I, P, or B), andnumeric values subsequent to the alphabets denote picture numbersindicating the display order. Also, a P picture uses, as a referencepicture, a forward I or P picture located in a close position in displayorder, while a B picture uses, as reference pictures, a forward I or Ppicture located in a close position in display order, and a singlebackward I or P picture located in a close position in display order.

FIG. 4 is a diagram explaining pictures and reference indices.“Reference indices”, which are used to uniquely identify referencepictures stored in the picture memory 111, indicate numbers associatedwith each picture as shown in FIG. 4. The reference indices are alsoused to designate reference pictures to be used at the time of codingblocks by means of inter picture prediction.

As values of the first reference index, with respect to a currentpicture to be coded, “0” is assigned to a forward reference picturewhich is closest to the current picture in display order, and valuesstarting from “1” are assigned to the other forward reference pictures.After values starting from “0” are assigned to all the forward referencepictures, the subsequent values are assigned to backward referencepictures, starting with a backward reference picture which is closest tothe current picture.

As values of the second reference index, with respect to the currentpicture, “0” is assigned to a backward reference picture which isclosest to the current picture in display order, and values startingfrom “1” are assigned to the other backward reference pictures. Aftervalues starting from “0” are assigned to all the backward referencepictures, the subsequent values are assigned to forward referencepictures, starting with a forward reference picture which is closest tothe current picture.

For example, when the first reference index Ridx1 is “0” and the secondreference index Ridx2 is “1” in FIG. 4, the forward reference picture isa B picture whose picture number is 7, and the backward referencepicture is a P picture whose picture number is 9. “Picture number” hereis a number indicating the display order. Note that a method forassigning reference indices shown in FIG. 3 is just an example methodand therefore that another method is also applicable.

Next, an explanation is given of the operation of the moving picturecoding apparatus with the above configuration.

As illustrated in FIG. 3A, input picture data is inputted to the picturememory 101 in display order on a picture-by-picture basis. As shown inFIG. 3B, for example, the pictures inputted in the picture memory 101,after being determined their picture types for coding, will be sortedinto an order in which coding shall be performed. This reordering intothe order of picture coding is performed on the basis of a “referencerelationship” among the pictures at the time of inter picture predictioncoding. More specifically, reordering is performed in a manner in whicha picture to be used as a reference picture comes before a picture whichwill use said picture as a reference picture so that the picture servingas a reference picture shall be coded before the picture that will usesaid picture as a reference picture. Note that as a method fordetermining picture types, a method in which picture types areperiodically determined, for example, is usually employed.

The pictures reordered in the picture memory 101 are then read out on amacroblock basis. A macroblock is a group of pixels in the size ofhorizontal 16×vertical 16, for example. Meanwhile, motion compensationand the extraction of a motion vector are performed for each block whichis a group of pixels in the size of horizontal 8×vertical 8, forexample.

A current macroblock read out from the picture memory 101 is inputted tothe motion vector estimation unit 107 and the difference calculationunit 102.

The motion vector estimation unit 107 performs vector estimation foreach block in the macroblock, using the decoded image data stored in thepicture memory 111 as a reference picture. Then, the motion vectorestimation unit 107 outputs, to the motion compensation coding unit 109,the estimated motion vector and the reference index indicating areference picture.

The motion compensation coding unit 109 determines a coding mode to beused for the macroblock, utilizing the estimated motion vector and thereference index from the motion vector estimation unit 107. Here, in acase of a B picture, for example, one of the following methods shall beselectable as a coding mode: intra picture coding; inter-pictureprediction coding using a forward motion vector; inter-pictureprediction coding using a backward motion vector; inter-pictureprediction coding using two motion vectors; and direct mode.

Referring to FIG. 5, an explanation is given of an inter pictureprediction method in direct mode. FIG. 5, which is a diagram explainingmotion vectors in direct mode, illustrates a case where a block a in apicture B8 is coded in direct mode. In this case, a motion vector c of ablock b, which is co-located with the block a, in a picture P9 that is abackward reference picture of the picture B8. This motion vector c,which is a motion vector used at the time of coding the block b, refersto a picture P5. Motion compensation is performed on the block a withreference to the picture P5 and the picture P9, using (i) a motionvector d, which is obtained by scaling the motion vector c, of thepicture P5 that is a forward reference picture, and (ii) a motion vectore of the picture P9 that is a backward reference picture.

The motion compensation coding unit 109 generates predictive image dataaccording to the above-determined coding mode, and outputs suchpredictive image data to the difference calculation unit 102 and theadder 106. Note that since a motion vector of a block, which isco-located with a current block, in a backward reference picture is usedas a reference motion vector as described above when the motioncompensation coding unit 109 selects direct mode, such reference motionvector and its reference index are read out from the motion vectorstorage unit 108. Also note that when the motion compensation codingunit 109 selects intra picture coding, no predictive image data isoutputted. Furthermore, the motion compensation coding unit 109 outputsthe determined coding modes, the motion vector and reference indexinformation to the filter processing control unit 110 and the bit streamgeneration unit 104, and outputs reference index values indicatingreference pictures to the filter processing control unit 110.

The difference calculation unit 102, which has received the predictiveimage data from the motion compensation coding unit 109, calculates thedifference between such predictive image data and image datacorresponding to a macroblock of the picture B11 read out from thepicture memory 101 so as to generate prediction residual image data, andoutputs it to the prediction residual coding unit 103.

The prediction residual coding unit 103, which has received theprediction residual image data, performs coding processing such asorthogonal transform and quantization on such prediction residual imagedata so as to generate coded data, and outputs it to the bit streamgeneration unit 104 and the prediction residual decoding unit 105. Thebit stream generation unit 104, which has received the coded data,performs variable length coding and the like on such coded data andadds, to such input coded data, the motion vector information, thecoding mode information and the like inputted by the motion compensationcoding unit 109 so as to generate and output a bit stream. Note thatwhen macroblocks are coded in direct mode, motion vector information isnot to be added to a bit stream.

The prediction residual decoding unit 105 performs decoding processingsuch as inverse quantization and inverse orthogonal transform on theinput coded data so as to generate decoded differential image data, andoutputs it to the adder 106. The adder 106 adds the decoded differentialimage data to the predictive image data inputted by the motioncompensation coding unit 109 so as to generate decoded image data, andoutputs it to the inter-pixel filter 114 via the switch 113.

The inter-pixel filter 114, which has received the decoded image data,applies filtering on such decoded image data using one of the followingfilters selected by the switch 112 and the switch 113: the filter A114a; the filter B114 b; the filter C114 c; and the filter D114 d. Or, theinter-pixel filter 114 stores the decoded image data in the picturememory 111 via the switch 112 without performing filtering (skip). Whenthis is done, the switching of the terminals “1”˜“5” of each of theswitch 112 and the switch 113 is controlled by the filter processingcontrol unit 110 in a manner described below.

FIG. 6 is a flowchart illustrating how a filtering strength isdetermined by the filter processing control unit 110.

The filter processing control unit 110 determines filtering strengthsrequired for block boundaries in both vertical and horizontal directionsof the decoded image data. A determination for selecting a filteringstrength used for filtering is made at the boundary of the two adjacentblocks p and q, as in the case of the prior art illustrated in FIG. 1(Step S201). First, the filter processing control unit 110 checks to seeif the blocks p and q are intra-picture-coded, on the basis of thecoding mode of each macroblock outputted by the motion compensationcoding unit 109 (Step S202). If one of these blocks is intra-coded (Yesin Step S202), the filter processing control unit 110 checks to see ifthe block boundary falls on a macroblock boundary (Step S203).

If the result of the check shows that the block boundary falls on themacroblock boundary, that is, if the two blocks are not from the samemacroblock, the filter processing control unit 110 selects the filterA114 a (Bs=4) with the strongest filtering strength (Yes in Step S203).To put it another way, the filter processing control unit 110 exertscontrol for switching a terminal of the switch 112 and a terminal of theswitch 113 to “1”, respectively. If the result of the check shows thatthe block boundary does not fall on the macroblock boundary, that is, ifthese two blocks are from the same macroblock, the filter processingcontrol unit 110 selects the filter B114 b (Bs≧3) with the secondstrongest strength (No in Step S203). To put it another way, the filterprocessing control unit 110 exerts control for switching a terminal ofthe switch 112 and a terminal of the switch 113 to “2”, respectively.Note that Bs≧3 here indicates that Bs is 3 or a larger value at leastunder the conditions illustrated in this flowchart, and whether Bs isBs=3 or a value larger than 3 shall be determined by other conditionsnot disclosed here. In the following, an equation that includes thisinequality sign shall indicate a value range which can be determined bythe conditions not disclosed in the present invention.

If the result of the check (Step S202) shows that neither of the blocksp nor q is intra-coded (No in Step S202), the filter processing controlunit 110 checks to see if any of the two blocks p and q containscoefficients indicating spatial frequency components resulted fromorthogonal transform (Step S204). If one of these blocks containscoefficients (Yes in Step S204), the filter processing control unit 110selects the filter C114 c (Bs≧2) with the third strongest strength. Toput it another way, the filter processing control unit 110 exertscontrol for switching a terminal of the switch 112 and a terminal of theswitch 113 to “3”, respectively.

If neither of the two blocks contains coefficients, that is, ifcoefficients are not coded in both blocks p and q (No in Step S204), thefilter processing control unit 110 checks to see if the picture thatincludes the blocks p and q is a P picture or a B picture (Step S205).If the picture that includes the blocks p and q is a P picture, thefilter processing control unit 110 checks to see if (i) the blocks p andq refer to the same reference picture and (ii) each difference betweenvertical components (V(p,y) and (V(q,y)) and horizontal components(V(p,x) and (V(q,x)) of the motion vectors of the respective blocks pand q is less than one pixel (Step S208), on the basis of the referenceindex values inputted by the motion compensation coding unit 109 and themotion vectors inputted by the motion vector storage unit 108. In otherwords, the filter processing control unit 110 checks if the followingequations (A), (B) and (C) are all satisfied or not:

Ref(p)=Ref(q)  (A)

|V(p,x)−V(q,x)|<1  (B)

|V(p,y)−V(q,y)|<1  (C)

Ref(p) and Ref(q) here denote reference pictures referred to by theblock p and the block q.

If the result of the check shows that the blocks p and q refer to thesame reference picture and that each difference between vertical andhorizontal motion vectors of the blocks p and q is less than one pixel(Yes in Step S208), the filter processing control unit 110 selectsno-filtering (Bs=0). To put it another way, the filter processingcontrol unit 110 exerts control for switching a terminal of the switch112 and a terminal of the switch 113 to “5”, respectively. In the othercase (No in Step S208), the filter processing control unit 110 selectsthe filter D114 d (Bs≧1) with the weakest filtering strength. To put itanother way, the filter processing control unit 110 exerts control forswitching a terminal of the switch 112 and a terminal of the switch 113to “4”, respectively.

If the result of the check (Step S205) shows that the picture thatincludes the blocks p and q is a B picture, a coding mode used forcoding a macroblock shall be one of the following: inter-pictureprediction coding using a forward motion vector; inter-pictureprediction coding using a backward motion vector; inter-pictureprediction coding using two motion vectors; and direct mode. Forexample, when the block p uses only forward prediction and the block quses prediction using two reference pictures, the number of referencepictures used by the block p is “1”, whereas the number of referencepictures used by the block q is “2”. Thus, the filter processing controlunit 110 checks to see if the number of reference pictures referred toby the block p and the number of reference pictures referred to by theblock q are the same (Step S206). If the result of the check shows thatthe blocks p and q refer to a different number of reference pictures (Noin Step S206), the filter processing control unit 110 selects the filterD114 d (Bs≧1) with the weakest filtering strength.

On the other hand, when the blocks p and q refer to the same number ofreference pictures (Yes in Step S206), the filter processing controlunit 110 checks to see if the blocks p and q use exactly the samereference picture(s), on the basis of the reference index valuesinputted from the motion compensation coding unit 109 (Step S207). Ifthe result of the check shows that any of the reference picturesreferred to by the blocks p and q differs (No in Step S207), the filterprocessing control unit 110 selects the filter D114 d (Bs≧1) with theweakest filtering strength.

Meanwhile, if the reference picture(s) referred to by the blocks p and qis/are exactly the same (Yes in Step S207), the filter processingcontrol unit 110 checks to see if the weighting (ABP) coefficients forweighted prediction in the blocks p and q are the same (Step S209). Ifthe result of the check shows that the ABP coefficients of therespective blocks p and q differ (No in Step S209), the filterprocessing control unit 110 selects the filter D114 d (Bs≧≧1) with theweakest filtering strength. “Weighted prediction” here is a predictionmethod in which a value obtained by multiplying a pixel value in areference picture by the first weighting coefficients α and further byadding the second weighting coefficients β to a result of suchmultiplication, serves as a predicted pixel value in inter pictureprediction.

On the other hand, if the ABP coefficients of the blocks p and q are thesame (Yes in Step S209), the filter processing control unit 110 checksto see if each difference between all of the vertical and horizontalmotion vectors of the blocks p and q are less than one pixel (StepS210). In other words, the filter processing control unit 110 checks ifthe following equations (D)˜(G) are all satisfied or not:

|Vf(p,x)−Vf(q,x)|<1  (D)

|Vf(p,y)−Vf(q,y)|<1  (E)

|Vb(p,x)−Vb(q,x)|<1  (F)

|Vb(p,y)−Vb(q,y)|<1  (G)

Here, Vf and Vb denote motion vectors in the respective blocks p and q,and there is only one of Vf and Vb when only one reference picture isused.

If the result of the check shows that each difference between all of thevertical and horizontal motion vectors of the blocks p and q is lessthan one pixel (Yes in Step S210), the filter processing control unit110 selects no-filtering (Bs=0). In the other case (No in Step S210),the filter processing control unit 110 selects the filter D114 d (Bs≧1)with the weakest filtering strength.

Note that it is possible to make a prediction on the macroblocks of a Bpicture using direct mode as described above. When direct mode isemployed, motion vectors of a current block are derived from the motionvector of a block, in a reference picture whose second reference indexRidx2 is “0”, which is co-located with the current block. In this case,a forward reference picture of the current block is a reference pictureto be referred to by the motion vector of the corresponding block, and abackward reference picture of the current block is a reference picturewhose second reference index Ridx2 is “0”. Subsequently, the filterprocessing control unit 110 utilizes such derived motion vectors and thereference picture to determine a filtering strength.

As described above, when the picture that includes the blocks p and q isa B picture, since a check is made to see if the number of referencepictures referred to by the block p and the number of reference picturesreferred to by the block q are the same, and if exactly the samereference picture(s) is/are used or not, it is possible to select anoptimum filtering strength even when prediction coding in which twopictures are referred to is employed. This makes it possible for movingpictures to be coded in a manner which allows the improvement in thequality of such moving pictures to be decoded.

FIG. 7 is a block diagram showing a moving picture decoding apparatusthat utilizes the filtering strength determination method according tothe present invention.

As shown in FIG. 7, this moving picture decoding apparatus, which is anapparatus for decoding a bit stream coded by the moving picture codingapparatus, is comprised of a bit stream analysis unit 201, a predictionresidual decoding unit 202, a motion compensation decoding unit 203, amotion vector storage unit 204, a filter processing control unit 205, apicture memory 206, an adder 207, switches 208 and 209, and aninter-pixel filter 210.

The bit stream analysis unit 201 extracts, from the input bit stream,various data including the coding mode information and the informationindicating the motion vectors used for coding. The prediction residualdecoding unit 202 decodes the input prediction residual coded data so asto generate the prediction residual image data. The motion compensationdecoding unit 203 obtains image data from reference pictures stored inthe picture memory 206 so as to generate motion compensated image data,on the basis of the coding mode information at the time of coding, themotion vector information and the like. The motion vector storage unit204 stores the motion vectors extracted by the bit stream analysis unit201. The adder 207 adds the prediction residual image data inputted bythe prediction residual decoding unit 202 to the motion compensatedimage data inputted by the motion compensation decoding unit 203 so asto generate decoded image data. The picture memory 206 stores thedecoded image data for which filtering has been applied.

The filter processing control unit 205 selects a filtering strength ofthe inter-pixel filter 210, i.e. selects one of a filter A210 a, afilter B210 b, a filter C210 c, a filter D210 d, and no-filtering(skip), and controls the switch 208 and the switch 209. The switch 208and the switch 209 are switches which selectively connect to one oftheir respective terminals “1”˜“5” under the control of the filterprocessing control unit 205. The switch 209 is placed between the outputterminal of the adder 207 and the input terminal of the inter-pixelfilter 210. Meanwhile, the switch 208 is placed between the inputterminal of the picture memory 206 and the output terminal of theinter-pixel filter 210.

The inter-pixel filter 210, which is a deblocking filter that filtersdecoded image data so as to remove block distortion which is highfrequency noise around block boundaries, has the filter A210 a, thefilter B210 b, the filter C210 c, the filter D210 d, each having adifferent filtering strength. Of these filters, the filter A210 a isindented for the strongest filtering, the filter B210 b for the secondstrongest, the filter C210 c for the third strongest, and the filterD210 d for the weakest filtering. Meanwhile, the amount of operationrequired for filtering depends on a filtering strength.

Next, an explanation is given of the moving picture decoding apparatuswith the above configuration. The bit stream analysis unit 201 extracts,from the input bit stream, various data including the coding modeinformation and the motion vector information. The bit stream analysisunit 201 outputs the extracted coding mode information to the motioncompensation decoding unit 203 and the filter processing control unit205, and outputs the motion vector information and the reference indicesto the motion vector storage unit 204. Furthermore, the bit streamanalysis unit 201 outputs the extracted prediction residual coded datato the prediction residual decoding unit 202. The prediction residualdecoding unit 202, which has received such prediction residual codeddata, decodes the prediction residual coded data so as to generate theprediction residual image data, and outputs it to the adder 207.

The motion compensation decoding unit 203 generates the motioncompensated image data, referring to the reference pictures stored inthe picture memory 206, on the basis of the coding mode information andthe reference index values inputted by the bit stream analysis unit 201,and the motion vector information read out from the motion vectorstorage unit 204. Then, the motion compensation decoding unit 203outputs the generated motion compensated image data to the adder 207,and outputs the reference index values indicating reference pictures tothe filter processing control unit 205. The adder 207 adds the motioncompensated image data to the prediction residual image data inputted bythe prediction residual decoding unit 202 so as to generate decodedimage data, and outputs it to the inter-pixel filter 210 via the switch209.

The inter-pixel filter 210, which has received the decoded image data,applies filtering on such decoded image data using one of the followingfilters selected by the switch 208 and the switch 209: the filter A210a; the filter B210 b; the filter C210 c; and the filter D210 d. Or, theinter-pixel filter 210 stores the decoded image data in the picturememory 206 via the switch 208 without performing filtering (skip). Whenthis is done, the switching of the terminals “1”˜“5” of each of theswitch 208 and the switch 209 is controlled by the filter processingcontrol unit 205 in an equivalent manner to that of the aforementionedfilter processing control unit 110 of the moving picture codingapparatus.

As described above, when the picture that includes the blocks p and q isa B picture, since a check is made to see if the number of referencepictures referred to by the block p and the number of reference picturesreferred to by the block q are the same, and if reference picture(s) tobe referred to is/are exactly the same or not, it is possible to selectan optimum filtering strength even when prediction coding in which twopictures are referred to is employed. This makes it possible for movingpictures to be decoded in a manner which allows the improvement in thequality of such moving pictures.

Second Embodiment

The second embodiment presents a filtering strength determination methodwhich is partly different from one employed by the filter processingcontrol unit 110 explained in the first embodiment. Note that theconfiguration required for the method according to the presentembodiment is equivalent to that of the first embodiment, and thereforethat detailed explanations thereof are omitted. Also note that anexplanation is also omitted where a filtering strength is determined inthe filter processing control unit 110 in the same manner as that of thefirst embodiment. It should be noted that the filtering strengthdetermination method of the filter processing control unit 205 isapplicable to the present embodiment regarding a moving picture decodingapparatus.

FIG. 8 is a flowchart illustrating a filtering strength determinationmethod according to the second embodiment.

If the result of a check (Step S304) performed by the filter processingcontrol unit 110 to see whether any of the two blocks p and q containscoefficients indicating spatial frequency components resulted fromorthogonal transform, shows that one of these blocks containscoefficients (Yes in Step S304), the filter processing control unit 110performs processing described below.

The filter processing control unit 110 checks to see if the picture thatincludes the blocks p and q is a P picture or a B picture (Step S311).If the picture that includes the blocks p and q is a P picture, thefilter processing control unit 110 selects the filter C114 c (Bs(p)≧2)with the third strongest filtering strength. Meanwhile, if the picturethat includes the blocks p and q is a B picture, the filter processingcontrol unit 110 selects Bs (b) (Bs (b)>Bs (p)) with a strongerfiltering strength than Bs (p) used for a P picture.

As described above, when any of the blocks p and q contains coefficientsindicating spatial frequency components resulted from orthogonaltransform, since a check is made to see if the picture that includesthese blocks p and q is a P picture or a B picture, it is possible toselect an optimum filtering strength even when prediction coding inwhich two pictures are referred to is employed. This makes it possiblefor moving pictures to be coded in a manner which allows the improvementin the quality of such moving pictures to be decoded.

Note that when the filter processing control unit 110 selectsno-filtering (Bs=0) in the above embodiments, it is possible that afilter with a weaker strength than the filter D114 d (Bs≧1) with theweakest filtering strength may be used, instead of applying no filtering(skip).

Also note that the filter processing control unit 110 does not have toexecute all steps illustrated in the flowchart of FIG. 5 or FIG. 8 inthe above embodiments and therefore that processing of these steps maybe partially omitted. For example, although the filter processingcontrol unit 110 performs check processing of Step S209 (S309) when theresult of a check performed in Step S207 (S307) shows that the blocks pand q refer to exactly the same reference picture(s) (Yes in Step S207(S307)), it is also possible that check processing of Step S210 (S310)may be performed instead. Moreover, the execution order of each step maybe transposed.

Furthermore, although coding is performed on a picture-by-picture basisin the above embodiments, a field or a frame may also serve as a unit ofcoding.

Third Embodiment

If a program for realizing the configuration of the moving picturecoding method or the moving picture decoding method as shown in each ofthe aforementioned embodiments is recorded on a recording medium such asa flexible disk, it becomes possible to easily perform the processingpresented in each of the aforementioned embodiments in an independentcomputer system.

FIG. 9 is a diagram explaining a recording medium which stores a programfor realizing the moving picture coding method and the moving picturedecoding method of the above embodiments in a computer system.

FIG. 9B shows an external view of the flexible disk viewed from thefront, a schematic cross-sectional view and the flexible disk, whileFIG. 9A illustrates an example physical format of the flexible disk as arecording medium itself. A flexible disk FD is contained in a case F, aplurality of tracks Tr are formed concentrically on the surface of thedisk in the radius direction from the periphery, and each track isdivided into 16 sectors Se in the angular direction. Therefore, in theflexible disk storing the above-mentioned program, the moving picturecoding method as such program is recorded in an area allocated for it onthe flexible disk FD.

FIG. 9C shows the structure for recording and reading out the program onand from the flexible disk FD. When the program is recorded on theflexible disk FD, the computer system Cs writes the moving picturecoding method or the moving picture decoding method as a program via aflexible disk drive FDD. When the moving picture coding method isconstructed in the computer system by the program on the flexible disk,the program is read out from the flexible disk via the flexible diskdrive and transferred to the computer system.

The above explanation is given on the assumption that a recording mediumis a flexible disk, but the same processing can also be performed usingan optical disc. In addition, the recording medium is not limited to aflexible disk and an optical disc and any other medium, such as an ICcard and a ROM cassette, capable of recording a program can be used.

Following is the explanation of the applications of the moving picturecoding method and the moving picture decoding method as shown in theabove embodiments, and the system using them.

FIG. 10 is a block diagram showing the overall configuration of acontent supply system ex100 for realizing a content distributionservice. The area for providing communication service is divided intocells of desired size, and base stations ex107˜ex110 which are fixedwireless stations are placed in respective cells.

In this content supply system ex100, a computer ex111, a PDA (PersonalDigital Assistant) ex112, a camera ex113, a cell phone ex114, and acamera-equipped cell phone ex115 are connected to the Internet ex101 viaan Internet service provider ex102, a telephone network ex104 and thebase stations ex107 ex110.

However, the content supply system ex100 is not limited to theconfiguration as shown in FIG. 10, and may be connected to a combinationof any of them. Also, each device may be connected directly to thetelephone network ex104, not through the base stations ex107˜ex110 whichare fixed wireless stations.

The camera ex113 is a device such as a digital video camera capable ofshooting moving pictures. The cell phone may be a cell phone of a PDC(Personal Digital Communication) system, a CDMA (Code Division MultipleAccess) system, a W-CDMA (Wideband-Code Division Multiple Access) systemor a GSM (Global System for Mobile Communications) system, a PHS(Personal Handyphone system) or the like.

A streaming server ex103 is connected to the camera ex113 via the basestation ex109 and the telephone network ex104, which enables livedistribution or the like using the camera ex113 based on coded datatransmitted from the user using the camera ex113. Either the cameraex113 or the server and the like for carrying out data transmission maycode the shot data. Also, moving picture data shot by a camera ex116 maybe transmitted to the streaming server ex103 via the computer ex111. Thecamera ex116 is a device such as a digital camera capable of shootingstill pictures and moving pictures. In this case, either the cameraex116 or the computer ex111 may code the moving picture data. An LSIex117 included in the computer ex111 and the camera ex116 performscoding processing. Note that software for coding and decoding movingpictures may be integrated into a certain type of storage medium (suchas a CD-ROM, a flexible disk and a hard disk) that is a recording mediumreadable by the computer ex111 or the like. Furthermore, thecamera-equipped cell phone ex115 may transmit the moving picture data.This moving picture data is data coded by the LSI included in the cellphone ex115.

In the content supply system ex100, content (such as a music live video)shot by the user using the camera ex113, the camera ex116 or the like iscoded in the same manner as the above-described embodiments andtransmitted to the streaming server ex103, and the streaming serverex103 makes stream distribution of the content data to clients at theirrequest. The clients include the computer ex111, the PDA ex112, thecamera ex113, the cell phone ex114 and so on capable of decoding theabove-mentioned coded data. The content supply system ex100 with theabove structure is a system in which the clients can receive andreproduce the coded data, and can further receive, decode and reproducethe data in real time so as to realize personal broadcasting.

The moving picture coding apparatus and the moving picture decodingapparatus presented in the above embodiments may be employed as anencoder and a decoder in the devices making up such system.

As an example of such configuration, a cell phone is taken as anexample.

FIG. 11 is a diagram showing the cell phone ex115 that incorporates themoving picture coding method and the moving picture decoding methodpresented in the above embodiments. The cell phone ex115 has an antennaex201 for transmitting/receiving radio waves to and from the basestation ex110 via radio waves, a camera unit ex203 such as a CCD cameracapable of shooting video and still pictures, a display unit ex202 suchas a liquid crystal display for displaying the data obtained by decodingvideo and the like shot by the camera unit ex203 and decoding videos andthe like received by the antenna ex201, a main body including a set ofoperation keys ex204, a voice output unit ex208 such as a speaker foroutputting voices, a voice input unit ex205 such as a microphone forinputting voices, a recording medium ex207 for storing coded or decodeddata such as data of moving or still pictures shot by the camera, dataof received e-mails and moving picture data or still picture data, and aslot unit ex206 for enabling the recording medium ex207 to be attachedto the cell phone ex115. The recording medium ex207 stores in itself aflash memory element, a kind of EEPROM (Electrically Erasable andProgrammable Read Only Memory) that is an electrically erasable andrewritable nonvolatile memory, in a plastic case such as a SD card.

Next, the cell phone ex115 will be explained with reference to FIG. 12.In the cell phone ex115, a main control unit ex311 for overallcontrolling the display unit ex202 and each unit of the main body ex204is configured in a manner in which a power supply circuit unit ex310, anoperation input control unit ex304, a picture coding unit ex312, acamera interface unit ex303, an LCD (Liquid Crystal Display) controlunit ex302, a picture decoding unit ex309, a multiplexing/demultiplexingunit ex308, a read/write unit ex307, a modem circuit unit ex306 and avoice processing unit ex305 are interconnected via a synchronous busex313.

When a call-end key or a power key is turned ON by a user's operation,the power supply circuit unit ex310 supplies to each unit with powerfrom a battery pack so as to activate the digital camera-equipped cellphone ex115 for making it into a ready state.

In the cell phone ex115, the voice processing unit ex305 converts voicesignals received by the voice input unit ex205 in conversation mode intodigital voice data under the control of the main control unit ex311comprised of a CPU, a ROM, a RAM and others, the modem circuit unitex306 performs spread spectrum processing on it, and a transmit/receivecircuit unit ex301 performs digital-to-analog conversion processing andfrequency transform processing on the data, so as to transmit it via theantenna ex201. Also, in the cell phone ex115, the transmit/receivecircuit unit ex301 amplifies a received signal received by the antennaex201 in conversation mode and performs frequency transform processingand analog-to-digital conversion processing on the data, the modemcircuit unit ex306 performs inverse spread spectrum processing on thedata, and the voice processing unit ex305 converts it into analog voicedata, so as to output it via the voice output unit ex208.

Furthermore, when transmitting an e-mail in data communication mode, thetext data of the e-mail inputted by operating the operation keys ex204on the main body is sent out to the main control unit ex311 via theoperation input control unit ex304. In the main control unit ex311,after the modem circuit unit ex306 performs spread spectrum processingon the text data and the transmit/receive circuit unit ex301 performsdigital-to-analog conversion processing and frequency transformprocessing on it, the data is transmitted to the base station ex110 viathe antenna ex201.

When the picture data is transmitted in data communication mode, thepicture data shot by the camera unit ex203 is supplied to the picturecoding unit ex312 via the camera interface unit ex303. When the picturedata is not transmitted, it is also possible to display the picture datashot by the camera unit ex203 directly on the display unit 202 via thecamera interface unit ex303 and the LCD control unit ex302.

The picture coding unit ex312, which incorporates the moving picturecoding apparatus according to the present invention, compresses andcodes the picture data supplied from the camera unit ex203 by the codingmethod employed in the moving picture coding apparatus presented in theabove embodiments, so as to convert it into coded picture data, andsends it out to the multiplexing/demultiplexing unit ex308. At thistime, the cell phone ex115 sends out the voices received by the voiceinput unit ex205 while the shooting by the camera unit ex203 is takingplace, to the multiplexing/demultiplexing unit ex308 as digital voicedata via the voice processing unit ex305.

The multiplexing/demultiplexing unit ex308 multiplexes the coded picturedata supplied from the picture coding unit ex312 and the voice datasupplied from the voice processing unit ex305 using a predeterminedmethod, the modem circuit unit ex306 performs spread spectrum processingon the resulting multiplexed data, and the transmit/receive circuit unitex301 performs digital-to-analog conversion processing and frequencytransform processing so as to transmit the processed data via theantenna ex201.

When receiving data of a moving picture file which is linked to a Webpage or the like in data communication mode, the modem circuit unitex306 performs inverse spread spectrum processing on the data receivedfrom the base station ex110 via the antenna ex201, and sends out theresulting multiplexed data to the multiplexing/demultiplexing unitex308.

In order to decode the multiplexed data received via the antenna ex201,the multiplexing/demultiplexing unit ex308 separates the multiplexeddata into a picture data bit stream and a voice audio data bit stream,and supplies the coded picture data to the picture decoding unit ex309and the voice data to the voice processing unit ex305 via thesynchronous bus ex313.

Next, the picture decoding unit ex309, which incorporates the movingpicture decoding apparatus according to the present invention, decodesthe picture data bit stream by the decoding method paired with thecoding method presented in the above embodiments to generate reproducedmoving picture data, and supplies this data to the display unit ex202via the LCD control unit ex302, and thus moving picture data included ina moving picture file linked to a Web page, for instance, is displayed.At the same time, the voice processing unit ex305 converts the voicedata into analog voice data, and supplies this data to the voice outputunit ex208, and thus voice data included in a moving picture file linkedto a Web page, for instance, is reproduced.

Note that the aforementioned system is not an exclusive example andtherefore that at least either the moving picture coding apparatus orthe moving picture decoding apparatus of the above embodiments can beincorporated into a digital broadcasting system as shown in FIG. 13,against the backdrop that satellite/terrestrial digital broadcasting hasbeen a recent topic of conversation. To be more specific, at abroadcasting station ex409, a coded bit stream of video information istransmitted to a satellite ex410 for communications, broadcasting or thelike by radio waves. Upon receipt of it, the broadcast satellite ex410transmits radio waves for broadcasting, an antenna ex406 of a houseequipped with satellite broadcasting reception facilities receives theradio waves, and an apparatus such as a television ex401 and a set topbox (STB) ex407 decodes the bit stream and reproduce the decoded data.The moving picture decoding apparatus as shown in the above embodimentscan be implemented in the reader ex403 for reading off and decoding thecoded bit stream recorded on a storage medium ex402 that is a recordingmedium such as a CD and a DVD. In this case, a reproduced video signalis displayed on a monitor ex404. It is also conceived to implement themoving picture decoding apparatus in the set top box ex407 connected toa cable ex405 for cable television or the antenna ex406 forsatellite/ground-based broadcasting so as to reproduce it on atelevision monitor ex408. In this case, the moving picture decodingapparatus may be incorporated into the television, not in the set topbox. Or, a car ex412 having an antenna ex411 can receive a signal fromthe satellite ex410, the base station ex107 or the like for reproducinga moving picture on a display device such as a car navigation systemex413.

Furthermore, it is also possible to code an image signal by the movingpicture coding apparatus presented in the above embodiments and recordthe coded image signal in a recording medium. Some examples are a DVDrecorder for recording an image signal on a DVD disc ex421, and arecorder ex420 such as a disc recorder for recording an image signal ona hard disk. Moreover, an image signal can be recorded in an SD cardex422. If the recorder ex420 is equipped with the moving picturedecoding apparatus presented in the above embodiments, it is possible toreproduce an image signal recorded on the DVD disc ex421 and in the SDcard ex422, and display it on the monitor ex408.

As the configuration of the car navigation system ex413, theconfiguration without the camera unit ex203 and the camera interfaceunit ex303, out of the configuration shown in FIG. 12, is conceivable.The same goes for the computer ex111, the television ex401 and others.

Concerning the terminals such as the cell phone ex114, atransmitting/receiving terminal having both an encoder and a decoder, aswell as a transmitting terminal only with an encoder and a receivingterminal only with a decoder are possible as forms of implementation.

As stated above, it is possible to employ the moving picture codingmethod and the moving picture decoding method according to theaforementioned embodiments in any one of the apparatuses and the systemdescribed above, and thus the effects explained in the above embodimentscan be achieved by so doing.

From the invention thus described, it will be obvious that theembodiments of the invention may be varied in many ways. Such variationsare not to be regarded as a departure from the spirit and scope of theinvention, and all such modifications as would be obvious to one skilledin the art are intended for inclusion within the scope of the followingclaims.

As is obvious from the above explanation, the filtering strengthdetermination method according to the present invention is capable ofdetermining, in an optimum manner, a strength of a filter for removingblock distortion by filtering decoded image data including highfrequency noise around block boundaries, even when prediction coding inwhich two pictures are referred to is employed. Accordingly, it ispossible for moving pictures to be coded in a manner which allows theimprovement in the quality of such moving pictures to be decoded. Whatis more, the filtering strength determination method according to thepresent invention is applicable to both a moving picture codingapparatus and a moving picture decoding apparatus, offering asignificant practical value.

INDUSTRIAL APPLICABILITY

As described above, the filtering strength determination method, themoving picture coding method and the moving picture decoding methodaccording to the present invention are suited as methods for generatinga bit stream by coding image data corresponding to each of picturesmaking up a moving picture and for decoding the generated bit stream ona cell phone, a DVD apparatus, a personal computer and the like.

1. A distortion removing method for removing coding distortion betweenblocks, the coding distortion occurring when both of a current block anda neighboring block are coded by inter picture prediction coding and donot contain coded data, the current block constituting a pictureemploying prediction coding using two reference pictures, theneighboring block being adjacent to the current block, and the codeddata being obtained by coding a coefficient that indicates a spatialfrequency component resulting from an orthogonal transformation, thedistortion removing method comprising: determining a predeterminedfiltering strength from among a plurality of filtering strengthsincluding one filtering strength corresponding to filtering not beingperformed; and removing the coding distortion between the blocks, byperforming a filtering with the predetermined filtering strengthdetermined in said determining of the predetermined filtering strength,wherein in said determining of the predetermined filtering strength,when the number of reference pictures referred to by the current blockand a number of reference pictures referred to by the neighboring blockare not the same, a weakest filtering strength among the plurality ofthe filtering strengths, excluding the one filtering strengthcorresponding to the filtering not being performed, is selected as thepredetermined filtering strength, and when the number of referencepictures referred to by the current block and the number of referencepictures referred to by the neighboring block are the same, one of (i) aweakest filtering strength among the plurality of the filteringstrengths, excluding the one filtering strength corresponding to thefiltering not being performed, and (ii) the filtering strengthcorresponding to the one filtering strength not being performed isselected as the predetermined filtering strength.